﻿<%@ Page  MasterPageFile="~/Site.Master" Language="C#" AutoEventWireup="true" CodeBehind="ProductList.aspx.cs" Inherits="RabbitManage.UI.ProductList" %>

<%--<asp:Content runat="server" ID="NaviContent" ContentPlaceHolderID="FeaturedContent">
    <ul id="menu">
        <li><a href="/UI/ShopDetail.aspx">商家信息</a></li>
        <li><a href="/UI/ProductList.aspx">产品列表</a></li>
        <li><a href="/UI/ProductAdd.aspx">产品上架</a></li>
    </ul>
</asp:Content>--%>
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    
    <section class="contact">

        <h3>产品列表:</h3>

        <%= list.Count %>个
        <br />
            
        <table>
            <tr>
                <td>名称</td>
                <td>单价</td>
                <td>净重</td>
                <td>毛重</td>
                <td>生产日期</td>
                <td>库存</td>
            </tr>
            
            
            <asp:Repeater runat="server" ID="productRepeater" >
                <ItemTemplate>
                    <tr>
                        <td><%#Eval("Name") %></td>
                        <td><%#Eval("PricePerUnit") %></td>
                        <td><%#Eval("NetWeight") %></td>
                        <td><%#Eval("GrossWeight") %></td>
                        <td><%#Eval("ProductionDate") %></td>
                        <td><%#Eval("Quantity") %></td>
                        <td>
                            <a href="ProductDetail.aspx?id=<%#Eval("Id") %>" target="_blank">预览</a>
                        </td>
                        <td>
                            <a href="ProductEdit.aspx?id=<%#Eval("Id") %>">编辑</a>
                        </td>
                        <td>
                            <a href="../Action/ProductDelete.aspx?id=<%#Eval("Id") %>" onclick="return confirm('确认删除？')">删除</a>
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
        </table>


    </section>
</asp:Content>